import axios from './http'
import url from './url'

axios.defaults.withCredentials = true
// axios.defaults.baseURL = 'http://192.168.3.175:8081'
export default {
  // 登录
  login (params) {
    return axios.post(url.login, params)
  },
  // 注册
  saveUser (params) {
    return axios.post(url.user, params)
  },
  // sadas
  logout () {
    return axios.get(url.logout)
  },
  getuser (params) {
    return axios.get(url.user, {params: params})
  },
  deleteUser (id) {
    return axios.delete(url.deleteuser + id)
  },
  upload (params) {
    return axios.post(url.upload, params)
  }
}
